<!--
/**
 * 菜单 列表页 JS 脚本
 * @author 李方捷 , leefangjie@qq.com
 * @since 2021-06-08 10:22:55
 */
 -->
 <!DOCTYPE html>
<html>

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8"/>
	<title th:text="${lang.translate('菜单')}">菜单</title>
    <link th:if(theme.ico!="null") rel="shortcut icon" th:href="${theme.ico}" type="image/vnd.microsoft.icon">
    <link th:if(theme.ico!="null") rel="icon" th:href="theme.ico" type="image/vnd.microsoft.icon">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="/assets/css/admin.css"/>
    <link rel="stylesheet" href="/assets/css/foxnic-web.css">
    <link href="/assets/libs/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/assets/libs/material-design-webfont/css/material-design-icons-min.css" rel="stylesheet">
    <link href="/assets/libs/material-design-webfont/css/material-design-icons-min.css" rel="stylesheet">
<style>
    html {
        background-color: #fff;
        color: #666;
    }
    .model-form {
        margin-left: 0px;
    }
    .fa {
        font-size: 14px;
    }
   .mdi {
        font-size: 16px;
    }
</style>
	<link th:each="css:${theme.css}" rel="stylesheet" th:href="${css}+'?'+${cacheKey}">
</head>

<body style="overflow: hidden">

<fieldset class="layui-elem-field layui-field-title form-group-title" style="margin-top: 10px;margin-bottom: 10px;margin-right: 8px;margin-left: 8px">
    <legend>编辑菜单</legend>
</fieldset>

<div id="container" style="width: 100%;overflow: auto">
<form id="data-form" lay-filter="data-form" class="layui-form model-form" style="width: 95%">

    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('编号')}">编号</label>
        <div class="layui-input-block">
            <input id="id" name="id" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('编号') }" type="text" class="layui-input"  readonly  />
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-form-label"><div th:text="${lang.translate('名称')}">名称</div><div class="layui-required">*</div></div>
        <div class="layui-input-block">
            <input id="label" name="label" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('名称') }" type="text" class="layui-input"   lay-verify="|required"  />
        </div>
    </div>



    <div class="layui-form-item">
        <div class="layui-form-label"><div th:text="${lang.translate('菜单类型')}">菜单类型</div><div class="layui-required">*</div></div>
        <div class="layui-input-block">
	      <input type="radio" name="type" th:each="e,stat:${enum.toArray('org.github.foxnic.web.constants.enums.system.MenuType')}" th:value="${e.code}" th:title="${e.text}"  lay-verify="|required" >
        </div>
    </div>

    <div class="layui-form-item" style="display:none">
        <label class="layui-form-label" th:text="${lang.translate('批次号')}">批次号</label>
        <div class="layui-input-block">
            <input id="batchId" name="batchId" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('批次号') }" type="text" class="layui-input"    />
        </div>
    </div>



    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('权限')}">权限</label>
        <div class="layui-input-block">
            <input id="authority" name="authority" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('权限') }" type="text" class="layui-input"    />
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('是否显示')}">显示</label>
        <div class="layui-input-block">
            <input type="checkbox" id="hidden" name="hidden" lay-filter="hidden" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('是否隐藏') }" lay-skin="switch" lay-text="显示&nbsp;|隐藏&nbsp;&nbsp;" />
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('菜单图标')}">样式</label>
        <div class="layui-input-inline" style="width: 200px;display: none;">
            <input id="css" name="css" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('样式') }" type="text" class="layui-input"    />
        </div>
        <div class="layui-input-inline" style="width: 100px;padding-left: 6px">
            <button id="icon-button" type="button" class="layui-btn"><i class="fa fa-briefcase" id="icon-button-el"></i>&nbsp;&nbsp;<span th:placeholder="${ lang.translate('请选择图标') }">请选择图标</span></button>
        </div>

    </div>

    <!--
    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('资源路径')}">资源路径</label>
        <div class="layui-input-block">
            <input id="path" name="path" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('资源路径') }" type="text" class="layui-input"    />
        </div>
    </div>
    -->
    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('页面路径')}">页面路径</label>
        <div class="layui-input-block">
            <div id="pathResourceId" th:data="${'/service-oauth/sys-resourze/query-paged-list'}"></div>
        </div>
    </div>

    <div class="layui-form-item" >
        <div class="layui-form-label"><div th:text="${lang.translate('页面参数')}">页面参数</div></div>
        <div class="layui-input-block">
            <input lay-filter="params" id="params" name="params" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('页面参数') }" type="text" class="layui-input"  />
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('路由地址')}">路由地址</label>
        <div class="layui-input-block">
            <input id="url" name="url" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('路由地址') }" type="text" class="layui-input"    />
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label" th:text="${lang.translate('资源清单')}">资源清单</label>
        <div class="layui-input-block">
            <div id="resourceIds" th:data="${'/service-oauth/sys-resourze/query-paged-list'}"></div>
        </div>
    </div>

    <div class="layui-form-item" >
        <div class="layui-form-label"><div th:text="${lang.translate('动态控制')}">动态控制</div></div>
        <div class="layui-input-block">
            <input lay-filter="dynamicHandler" id="dynamicHandler" name="dynamicHandler" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('动态控制类') }" type="text" class="layui-input"  />
        </div>
    </div>



    <div class="layui-form-item" style="display:none">
        <label class="layui-form-label" th:text="${lang.translate('上级ID')}">上级ID</label>
        <div class="layui-input-block">
            <input id="parentId" name="parentId" th:placeholder="${ lang.translate('请输入') +''+ lang.translate('上级ID') }" type="text" class="layui-input"    />
        </div>
    </div>

    <div class="model-form-footer" style="padding-top: 6px;padding-bottom:2px;margin-bottom:2px;margin-left: 2px;margin-right: 2px">
        <button class="layui-btn"  id="submit-button" lay-filter="submit-button" lay-submit th:text="${lang.translate('保存')}" style="margin-right: 16px;margin-bottom: 4px">保存</button>
    </div>
</form>
</div>

<script type="text/javascript" src="/module/global.js"></script>
<script type="text/javascript" src="/assets/libs/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="/assets/libs/pandyle.min.js"></script>
<script type="text/javascript" src="/assets/libs/layui/layui.js"></script>

<script th:inline="javascript">
    var LAYUI_TABLE_WIDTH_CONFIG = [[${layuiTableWidthConfig}]];
    var VALIDATE_CONFIG={"hidden":{"labelInForm":"是否隐藏","inputType":"number_input","required":true},"label":{"labelInForm":"标签","inputType":"text_input","required":true},"sort":{"labelInForm":"显示顺序","inputType":"number_input","required":false},"type":{"labelInForm":"菜单类型","inputType":"text_input","required":true}};
    var AUTH_PREFIX="sys_menu";


</script>

<script src="/business/oauth/menu/menu_form.js"></script>

</body>
</html>
